class AddVersions < ActiveRecord::Migration
  def self.up
    Element.create_versioned_table
    Element.transaction do
      Element.find(:all).each do |e|
        e.version = 1
        e.save_version
      end
    end
  end

  def self.down
    Element.drop_versioned_table
  end
end
